<div style="border:solid 1px #CCC;width: 1024px;margin: 0 auto;">
    <!--<h1>Welcome to Tracking Code </h1>-->
    <form action="<?=base_url('index.php/module/get_bill');?>" method="post">
        <table width="800" align="center" style="border:solid 1px #CCC;">
            <tr>
                <td align="left" width="250">
                    <input type="radio" name="track_ref" value="bill_number" checked="checked"> Tracking No.
                    <input type="radio" name="track_ref" value="container_id"> Reference No
                    
                    <!--					<select name="track_ref">
						<option value=""></option>
						<option selected="selected" value=""></option>
					</select> --><br />
					<input type="text" name="tcode">
				</td>
                <td align="left" valign="bottom"><input type="submit" value="Submit" ></td>                
            </tr>            
        </table>        
    </form>
    <?php        
        $billdata = (isset($bill_data['bill']) ? $bill_data['bill']:'');
        $status = (isset($bill_data['status']) ? $bill_data['status']:'');        
    ?>
    <table width="800" align="center" style="border:solid 1px #CCC;" cellpadding="0" cellspacing="0">
        <?php        
        if(count($billdata)>0 && !empty($billdata)){?>
        <tr>
            <td valign="top" width="100">Tracking Code</td>
            <td width="150" valign="top" align="left"><?=$billdata['bill_number'];?></td>        
            <td style="border-left:solid 1px #CCC;padding-left:10px;">
                Date: <b><?=$billdata['edd'];?></b> <br>
                Origin Service Area: <b><?=$billdata['origin'];?></b><br>
                Destination Service Area: <b><?=$billdata['destination'];?></b><br>
            </td>        
        </tr>            
        <?php }?>
    </table>
    <?php if(count($status)>0 && !empty($status)){?>
    <table width="800" align="center">
        <?php 
        $c = 1;
        foreach($status as $sta){?>
        <tr bgcolor="#FFFF00">
            <td align="center">SL</td>
            <td align="center"><?=$sta['sdate'];?></td>
            <td align="center">Location</td>
            <td align="center">Time</td>
        </tr>
        <tr>
            <td align="center"><?=$c;?></td>
            <td align="center"><?=$sta['status'];?></td>
            <td align="center"><?=$sta['location'];?></td>
            <td align="center"><?=$sta['t_hour'];?>:<?=$sta['t_min'];?></td>
        </tr>        

    <?php 
    $c++;
        }}?>        
	</table>
	
	
	<table width="800" align="center" style="border:solid 1px #CCC;padding:10px;" cellpadding="0" cellspacing="0">
        <?php        
        if(count($billdata)>0 && !empty($billdata)){?>
        <tr>
            <td valign="top">
			Tracking Code: <?=$billdata['bill_number'];?> <br />
			Container Number: <?=$billdata['container_id'];?> <br />
			</td>
            <td style="border-left:solid 1px #CCC;padding-left:10px;">
                Date: <b><?=$billdata['edd'];?></b> <br>
                Origin Service Area: <b><?=$billdata['origin'];?></b><br>
                Destination Service Area: <b><?=$billdata['destination'];?></b><br>
				Bill Of Lading: <b><?=$billdata['bill_of_lading'];?></b><br>
				Shipper: <b><?=$billdata['shipper'];?></b><br>
				Consignee: <b><?=$billdata['consignee'];?></b><br>
				Consignor: <b><?=$billdata['consignor'];?></b><br>
				weight: <b><?=$billdata['weight'];?></b><br>
				Rar: <b><?=$billdata['rar'];?></b><br>
				Duty: <b><?=$billdata['duty'];?></b><br>				
            </td>        
        </tr>            
        <?php }?>
    </table>
</div>